﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Students
{
    class student
    {
        //定义公有字段学生姓名
        public string StudentName { get; set; }
          //定义私有字段年龄
       private int age { get; set; }
         //定义公有字段性别
        public string Sex { get; set; }
        //定义公有字段班级
        public int Class { get; set; }

        public void printMsg()
        {
            Console.WriteLine("姓名："+StudentName);
            Console.WriteLine("班级："+Class);
            Console.WriteLine("性别："+Sex);
        }

    }
}
